/*
 * sdfat_rr.h
 *
 * Created: 21.03.2012 22:21:46
 *  Author: Luke
 */ 


#ifndef SDFAT_RR_H_
#define SDFAT_RR_H_

int sdFatInit();

/* dump file to serial as text or hexdump (#define HEXDUMP) */
void sdDumpFile(const char* fname);

/* opens a global file handle */
uint8_t sdOpenStream(const char* fname);

/* opens a global file handle by number 
   (filename nnn*.mp3; only the first 3 chars must match the 0-padded file_number)*/
uint8_t sdOpenStream_nnn(uint8_t file_number);

/* closes the global file handle */
void sdCloseStream(void);

/* copies the next sizeof(buffer) bytes from the stream file into buffer */
uint8_t sdFillStreamBuffer(uint8_t *buffer, uintptr_t size);

#endif /* SDFAT_RR_H_ */